<?php
$br = (php_sapi_name() == "cli")? "":"<br>";

if(!extension_loaded('shd')) {
	dl('shd.' . PHP_SHLIB_SUFFIX);
}

$str1 = "test param1";
$str2 = 'test param2';
$ret = shd_params($str1, $str2);
echo 'shd_params($str1, $str2): ' . "\n";
echo "str1: {$str1}; str2: {$str2}; RETURN: {$ret}\n";

$str1 = "test param1";
$str2 = 'test param2';
$ret = shd_params($str1);
echo 'shd_params($str1): ' . "\n";
echo "str1: {$str1}; str2: {$str2}; RETURN: {$ret}\n";

$str1 = "test param1";
$str2 = 'test param2';
$ret = shd_hashtable();
echo 'shd_hashtable(): ' . "\n";
echo "str1: {$str1}; str2: {$str2}; RETURN: \n";
print_r($ret);

$arr = array("test array item", 'aaaa');
$ret = shd_foreach($arr);
echo 'shd_foreach($arr): ' . "\n";
echo "\$arr: \n";
print_r($arr);

//$arr = array("test array item", 'aaaa');
$ret = shd_array();
echo 'shd_array($arr): ' . "\n";
echo "\$arr: \n";
print_r($ret);

// test class
echo "===An interface===\n";
$parent_cls = new parent_myclass();
$parent_cls->public_method();
echo "\n===An interface===\n";

echo "===An child class===\n";
$my_class = new myclass();
$my_class->public_method();
echo "===An child class===\n";
echo "\n";
//print_r($my_class);
